<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*,java.util.*"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
 <jsp:useBean id="query" scope="session" class="dataconn.Dataconn"/>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>插入数据</title>
   </head>
   <body>
       <%!String title,url,type,sql,original,logo,id; %>
       <% int i;%>      
       <%
          title=request.getParameter("rss_title");
          url=request.getParameter("rss_url");
          type=request.getParameter("rss_type");
          original=request.getParameter("rss_original");
          logo=request.getParameter("rss_logo");
          //if(xuehao.length()!=7){//检查学号的位数
           //   response.sendRedirect("err.jsp");
         // }
          //if(name.equals("")){//检查姓名是否为空
           //   response.sendRedirect("err.jsp");
          //}
          
   sql="select * from rss where rss_id='"+id+"'";
          ResultSet  rs=query.executeQuery(sql);
          //if(rs.getRow()>0)
         // {     response.sendRedirect("err.jsp");   }
          sql="insert into userlist(rss_title,rss_type,rss_url,rss_original,rss_logo)"+"values('"+title+"','"+type+"','"+url+"','"+original+"','"+logo+"')";
          query.executeUpdate(sql);
          out.println("正在处理信息，请稍后......<meta http-equiv='refresh' content='2;url=add_index.jsp'>");
         // rs.close();
          query.closeStmt();
          query.closeConn();
        %>
     </body>
</html>